package com.pigotech.ptwo.constant;

/**
 * Created by ghb on 2018/3/15.
 */

public class Constant {
    /** IP地址 **/
    public static final String IP_ADDRESS = "192.168.42.1";
    /**
     * 端口号
     */
    public static final String PORT = "7878";

    /**
     * 普通视频缩略图的根目录  小朱说是把/tmp去掉
     */
    public static final String NORMAL_VIDEO_TUMB_DIRECTORY = "/SD0/NORMAL/Thumb/";




    //amba 命令参数集合
    public class AmbaJsonCommand {

	/*
	 * 文件默认目录
	 */
        //public static final String DEAFAULT_DIRECTORY = "/tmp/fuse_d/DCIM/100MEDIA";

        public static final  String DEAFAULT_DIRECTORY = "/tmp/SD0/PHOTO/M_photo";
        public static final  String VIDEO_DIRECTORY = "/tmp/SD0/NORMAL/M_video";
        public static final  String SECURITY_DIRECTORY = "/tmp/SD0/SECURITY/M_video";
        public static final  String SHARE_DIRECTORY = "/tmp/fuse_d/SHARE";
        public static final  String RECORD_DIRECTORY = "/tmp/fuse/RECORD";
        public static final  String EVENT_DIRECTORY = "/tmp/SD0/EVENT/M_video";
        public static final String TRACK_DIRECTORY = "/tmp/fuse_d/TRACK";
        public static final  String ROOT_DIRECTORY = "/tmp/fuse_d/";
        public static final String RECORD_A12_DIRECTORY = "/tmp/fuse_d/NetCtrl";//A12专用
        /*
         * JSON格式的key
         */
        public static final String KEY_TOKEN = "token";
        public static final String KEY_MSGID = "msg_id";
        public static final String KEY_TYPE = "type";
        public static final String KEY_RETURNVALUE = "rval";
        public static final String KEY_PARAM = "param";
        public static final String KEY_SETTABLE = "settable";
        public static final String KEY_READONLY = "readonly";
        public static final String KEY_LOGO = "logo";
        public static final String KEY_INFO = "info";
        public static final String KEY_CARD = "card";
        public static final String KEY_PWD = "pwd";
        public static final String KEY_LISTING = "listing";
        public static final String KEY_FETCHSIZE = "fetch_size";
        public static final String KEY_OFFSET = "offset";
        public static final String KEY_REMSIZE = "rem_size";
        public static final String KEY_OPTION = "options";
        public static final String KEY_PERMISSION = "permission";

        //device info
        public static final String KEY_DEVICEINFO_BRAND = "brand";
        public static final String KEY_DEVICEINFO_MODEL = "model";
        public static final String KEY_DEVICEINFO_API_VER = "api_ver";
        public static final String KEY_DEVICEINFO_FW_VER = "fw_ver";
        public static final String KEY_DEVICEINFO_WiFi_MAC = "WiFi-MAC";
        public static final String KEY_DEVICEINFO_EDOG = "edog";
        public static final String KEY_DEVICEINFO_APP_TPYE = "app_type";
        //media info
        public static final String KEY_MD5SUM = "md5sum";
        public static final String KEY_THUMB_FILE = "thumb_file";
        public static final String KEY_SIZE = "size";
        public static final String KEY_DATE = "date";
        public static final String KEY_RESOLUTION = "resolution";
        public static final String KEY_DURATION = "duration";
        public static final String KEY_MEDIE_TYPE = "media_type";


        /*
         * msg_id 命令序号
         */
        //system
        public static final int MSGID_AMBA_GET_SETTING = 1;
        public static final int MSGID_AMBA_SET_SETTING = 2;
        public static final int MSGID_AMBA_GET_ALL_CURRENT_SETTINGS = 3;
        public static final int MSGID_AMBA_FORMAT = 4;
        public static final int MSGID_AMBA_GET_SPACE = 5;
        public static final int MSGID_AMBA_GET_NUMB_FILES = 6;
        public static final int MSGID_AMBA_NOTIFICATION = 7;
        public static final int MSGID_AMAA_BURNIN_FW = 8;
        public static final int MSGID_AMBA_GET_SINGLE_SETTING_OPTIONS = 9;
        public static final int MSGID_AMBA_PUT_GPS_INFO = 10;
        public static final int MSGID_AMBA_GET_DEVICEINFO = 11;
        public static final int MSGID_AMBA_POWER_MANAGE = 12;
        public static final int MSGID_AMBA_GET_BATTERY_LEVEL = 13;
        public static final int MSGID_AMBA_DIGITAL_ZOOM = 14;
        public static final int MSGID_AMBA_DIGITAL_ZOOM_INFO = 15;
        public static final int MSGID_AMBA_CHANGE_BITRATE = 16;
        //Session Controls
        public static final int MSGID_AMBA_START_SESSION = 257;
        public static final int MSGID_AMBA_STOP_SESSION = 258;
        public static final int MSGID_AMBA_RESETVF = 259;
        public static final int MSGID_AMBA_STOP_VF = 260;
        public static final int MSGID_AMBA_SET_CLIENT_INFO = 261;
        //Video Commands
        public static final int MSGID_AMBA_RECORD_START = 513;
        public static final int MSGID_AMBA_RECORD_STOP = 514;
        public static final int MSGID_AMBA_GET_RECORD_TIME = 515;
        public static final int MSGID_AMBA_FORCE_SPLIT = 516;
        //Photo Commands
        public static final int MSGID_AMBA_TAKE_PHOTO = 769;
        public static final int MSGID_CONTINUE_BURST_COMPLETE = 7; //特别值，此命令无token
        public static final int MSGID_AMBA_CONTINUE_CAPTURE_STOP = 770;
        //File System Commands
        public static final int MSGID_AMBA_DEL_FILE = 1281;
        public static final int MSGID_AMBA_LS = 1282;
        public static final int MSGID_AMBA_CD = 1283;
        public static final int MSGID_AMBA_PWD = 1284;
        public static final int MSGID_AMBA_GET_FILE = 1285;
        public static final int MSGID_AMBA_PUT_FILE = 1286;
        public static final int MSGID_AMBA_CANCEL_GET_FILE = 1287;
        //WiFi Commands
        public static final int MSGID_AMBA_WIFI_RESTART = 1537;
        public static final int MSGID_AMBA_WIFI_INFO_SET = 1538;
        public static final int MSGID_AMBA_WIFI_INFO_GET = 1539;
        //Media Commands
        public static final int MSGID_AMBA_GET_THUMB = 1025;
        public static final int MSGID_AMBA_GET_MEDIAINFO = 1026;
        public static final int MSGID_AMBA_SET_MEDIA_ATTRIBUTE = 1027;
        //Query Commands
        public static final int MSGID_AMBA_QUERY_SESSION_HOLDER = 1793;

        // Other Commands
        public static final int MSGID_AMBA_GET_IS_INTROUBLE = 0x10000003;
        public static final int MSGID_AMBA_GETREMOTEFILE_FAILUE = 134217730;
        public static final int MSGID_AMBA_GETREMOTEFILE_SUCCESS = 134217729;//
        public static final int MSGID_AMBA_GET_RECORDFILELOCATION = 134217731;
        public static final int MSGID_AMBA_GETWIFISSID = 134217738;
        public static final int APK_AMBA_START_MSG=134217728;
        public static final int MSGID_AMBA_GET_NORMAL_TXT = APK_AMBA_START_MSG+15;//获取普通视频txt
        public static final int MSGID_AMBA_GET_PHOTO_TXT = APK_AMBA_START_MSG+17;//获取照片txt
        public static final int MSGID_AMBA_GET_EVENT_TXT = APK_AMBA_START_MSG+16;//获取紧急视频txt
        public static final int MSGID_AMBA_GET_MICRO_VIDEO_TXT = APK_AMBA_START_MSG+18;//获取微视频txt
        public static final int MSGID_AMBA_Start_Update_Version = APK_AMBA_START_MSG+19;//通知DVR开始更新固件
        public static final int MSGID_AMBA_HEART = APK_AMBA_START_MSG+25;//心跳发送
        public static final int MSGID_AMBA_ADAS_LANE_RE_CALIB=APK_AMBA_START_MSG+26;//车道重新校正
        public static final int MSGID_AMBA_RESTORE_DEFAULT=APK_AMBA_START_MSG+27;//恢复出厂设置
        public static final int MSGID_AMBA_WIIF_MODY_NAME=APK_AMBA_START_MSG+11;//修改wifi名称
        public static final int MSGID_AMBA_WIIF_MODY_PWD=APK_AMBA_START_MSG+12;//修改wifi密码
        public static final int MSGID_AMBA_Complete_Update_Version = APK_AMBA_START_MSG+20;//通知DVR更新固件完成，要重启
        public static final int MSGID_AMBA_Start_Update_Dog = APK_AMBA_START_MSG+28;//通知DVR开始更新电子狗
        public static final int MSGID_AMBA_Complete_Update_Dog = APK_AMBA_START_MSG+29;//通知DVR接收电子狗完成

        //A12专用命令
        public static final int MSGID_AMBA_A12_GET_FILE_LIST=268435458;//获取文件列表
        /*
         * 命令类型
         */
        //System Commands
        public static final String TYPE_APP_STATUS = "app_status";
        public static final String TYPE_CAMERA_CLOCK = "camera_clock";
        public static final String TYPE_MULTI_CHANNEL = "multi_channel";
        public static final String TYPE_PHOTO_CAPTURE_MODE = "photo_capture_mode";
        public static final String TYPE_PHOTO_QUALITY = "photo_quality";
        public static final String TYPE_PHOTO_STAMP = "photo_stamp";
        public static final String TYPE_STD_DEF_VIDEO = "std_def_video";
        public static final String TYPE_STREAM_TYPE = "dual_streaming";
        public static final String TYPE_PHOTO_LOG = "photo_log";
        public static final String TYPE_PHOTO_LOG_INTERVAL = "photo_log_interval";
        public static final String TYPE_VIDEO_LOG = "video_log";
        public static final String TYPE_VIDEO_LOG_INTERVAL = "video_log_interval";
        public static final String TYPE_VIDEO_LOG_DURATION = "video_log_duration";
        public static final String TYPE_TIMELAPSE_PHOTO = "timelapse_photo";
        public static final String TYPE_TIMELAPSE_PHOTO_INTERVAL = "timelapse_photo_interval";
        public static final String TYPE_VIDEO_QUALITY = "video_quality";
        public static final String TYPE_VIDEO_RESOLUTION = "video_resolution";
        public static final String TYPE_STREAM_WIHLE_RECORD = "stream_while_record";
        public static final String TYPE_VIDEO_WDR = "video_WDR";
        public static final String TYPE_VIDEO_STAMP = "video_stamp";
        public static final String TYPE_EXT_GPS = "ext_gps";
        public static final String TYPE_PHOTO_SIZE = "photo_size";
        public static final String TYPE_EVENT_DIR = "event_dir";
        public static final String TYPE_TOTAL_SPACE = "total";
        public static final String TYPE_FREE_SPACE = "free";
        public static final String TYPE_STREAM_OUT_TYPE = "stream_out_type";
        public static final String TYPE_PARKING_MODE= "apk_parking_mode";
        public static final String TYPE_MOTION_DETECT = "apk_motion_detect";
        public static final String TYPE_SOUND = "apk_sys_sound";
        public static final String TYPE_MIC = "apk_mic";
        public static final String TYPE_MOVIE_LENGTH = "clip_duration";//clip_duration apk_movie_length
        public static final String TYPE_ADAS = "apk_adas";
        public static final String TYPE_EDOG = "apk_edog";
        public static final String TYPE_Apk_fw = "Apk_fw";
        public static final String TYPE_APK_TIME_SYNC="Apk_time_sync";
        public static final String TYPE_PowerOn_Beep = "apk_poweron_beep";
        public static final String TYPE_Gsensor = "apk_gsensor";
        public static final String TYPE_VideoRes = "Apk_video_res";
        public static final String TYPE_TIMEFORMAT = "Apk_time_style";
        public static final String TYPE_ALARM = "Apk_alarm";
        public static final String TYPE_RESET = "Apk_default";//A12恢复出厂设置
        public static final String TYPE_TROUBLE = "Apk_trouble_file";//故障视频
        //Media
        public static final String TYPE_THUMB = "thumb";
        public static final String TYPE_IDR = "idr";
        public static final String TYPE_FULLVIEW = "Fullview";
        public static final String MEDIA_THUMB_FILE = "thumb_file";
        public static final String MEDIA_DATE = "date";
        public static final String MEDIA_RESOLUTION = "resolution";
        public static final String MEDIA_DURATION = "duration";
        public static final String MEDIA_TYPE = "media_type";

        // App_status值
        public static final String VALUE_APP_STATUS_RECORD = "record";
        public static final String VALUE_APP_STATUS_VF = "vf";
        public static final String VALUE_APP_STATUS_IDLE = "idle";

        // stream_type值
        public static final String VALUE_STREAM_TYPE_NONE = "none";
        public static final String VALUE_STREAM_TYPE_RTSP = "rtsp";
        public static final String VALUE_STREAM_TYPE_MJPG = "mjpg";

        //Notification
        public static final String TYPE_CAMERA_CONNECT_TO_PC = "camera_connect_to_pc";
        public static final String TYPE_CAPTURE_MODE = "capture_mode";
        public static final String TYPE_DISCONNECT_HDMI = "disconnect_HDMI";
        public static final String TYPE_DISCONNECT_SHUTDOWN = "disconnect_shutdown";
        public static final String TYPE_FW_UPGRADE_COMPLETE = "fw_upgrade_complete";
        public static final String TYPE_LOW_BATTERY_WARNING = "low_battery_warning";
        public static final String TYPE_LOW_STORAGE_WARNING = "low_storage_warning";
        public static final String TYPE_PHOTO_TAKEN = "photo_taken";
        public static final String TYPE_STARTING_VIDEO_RECORD = "starting_video_record";
        public static final String TYPE_REMOTE_PICTURE = "smart_rf_send_picture";
        public static final String TYPE_TIMELAPSE_PHOTO_STATUS = "timelapse_photo_status";
        public static final String TYPE_VIDEO_RECORD_COMPLETE = "video_record_complete";
        public static final String TYPE_FILE_COMPLETE = "get_file_complete";
        public static final String TYPE_FILE_FAILTURE = "get_file_fail";
        public static final String TYPE_FILE_REMOVE = "File_Reovmed";
        public static final String TYPE_FILE_ADD = "File_Added";
        //Notification param
        public static final String PARAM_BYTESSENT = "bytes sent";
        public static final String PARAM_MD5SUM = "md5sum";
	/*
	 * 命令参数(type)
	 */

        /*
         * 命令正确响应
         */
        public static final int AMBACORRET_RREUTN = 0;
        /*
         * 响应错误类型
         */
        public static final int AMBAERROR_UNKNOWN_ERROR = -1;
        public static final int AMBAERROR_SESSION_START_FAIL = 3;
        public static final int AMBAERROR_INVALID_TOKEN = -4;
        public static final int AMBAERROR_REACH_MAX_CLNT = -5;
        public static final int AMBAERROR_JSON_PACKAGE_ERROR = -7;
        public static final int AMBAERROR_JSON_PACKAGE_TIMEOUT = -8;
        public static final int AMBAERROR_JSON_SYNTAX_ERROR = -9;
        public static final int AMBAERROR_INVALID_OPTION_VALUE = -13;
        public static final int AMBAERROR_INVALID_OPERATION = -14;
        public static final int AMBAERROR_HDMI_INSERTED = -16;
        public static final int AMBAERROR_NO_MORE_SPACE = -17;
        public static final int AMBAERROR_CARD_PROTECTED = -18;
        public static final int AMBAERROR_NO_MORE_MEMORY = -19;
        public static final int AMBAERROR_PIV_NOT_ALLOWED = -20;
        public static final int AMBAERROR_SYSTEM_BUSY = -21;
        public static final int AMBAERROR_APP_NOT_READY = -22;
        public static final int AMBAERROR_OPERATION_UNSUPPORTED = -23;
        public static final int AMBAERROR_INVALID_TYPE = -24;
        public static final int AMBAERROR_INVALID_PARAM = -25;
        public static final int AMBAERROR_INVALID_PATH = -26;

        //命令值
//	public static final String STAMP[] = {"off", "date",  "time", "date/time"};
//	public static final String QUALITY[] = {"S.Fine", "Fine", "Normal"};
//	public static final String VIDEORESOLUTION[] = {"1920x1080 30P 16:9", "1280x720 30P 16:9", "848x480 30P 16:9"};
//	public static final String VIDEO_WDR[] = {"off", "on"};
//	public static final String ON_OR_OFF[] = {"off", "on"};
//	public static final String PHOTOSIZE[] = {"2.8M (1920x1440 4:3)", "2.5M (1920x1280 3:2)", "2.1M (1920x1080 16:9)"};
//	public static final String RESOLUTION[] = {"", ""};
        public static final String OPTION_OFF = "off";
        public static final String OPTION_ON = "on";
        public static final String OPTION_STAMP_DATE = "date";
        public static final String OPTION_STAMP_TIME = "time";
        public static final String OPTION_STAMP_DATEANDTIME = "date/time";
        public static final String OPTION_QUALITY_SFINE = "S.Fine";
        public static final String OPTION_QUALITY_FINE = "Fine";
        public static final String OPTION_QUALITY_NORMAL = "Normal";
        public static final String OPTION_VIDEORESOLUTION_19201080_30 = "1920x1080 30P 16:9";
        public static final String OPTION_VIDEORESOLUTION_19201080_60 = "1920x1080 60P 16:9";
        public static final String OPTION_VIDEORESOLUTION_16001200_60 = "1600x1200 60P 4:3";
        public static final String OPTION_VIDEORESOLUTION_1280720_60 = "1280x720 60P 16:9";
        public static final String OPTION_VIDEORESOLUTION_1280720_30 = "1280x720 30P 16:9";
        public static final String OPTION_VIDEORESOLUTION_848480_60 = "848x480 60P 16:9";
        public static final String OPTION_VIDEORESOLUTION_848480_30 = "848x480 30P 16:9";
        public static final String OPTION_VIDEORESOLUTION_1280720_120 = "1280x720 120P 16:9";
        public static final String OPTION_VIDEORESOLUTION_848480_120 = "848x480 120P 16:9";
        public static final String OPTION_PHOTOSIZE_19201440_43 = "2.8M (1920x1440 4:3)";
        public static final String OPTION_PHOTOSIZE_19201280_32 = "2.5M (1920x1280 3:2)";
        public static final String OPTION_PHOTOSIZE_19201080_169 = "2.1M (1920x1080 16:9)";
    }

}
